﻿<%@ Page Title="资源清单-RBAC" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="RBAC.Administry.Resource.List" %>
<%@ Register src="../Control/EmptyData.ascx" tagname="EmptyData" tagprefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../style/css/jquery.jgrowl.css" rel="stylesheet" type="text/css" />
    <script src="../script/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../script/jquery.jgrowl_compressed.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        function done() {
            $.jGrowl("资源已删除!", { life: 1200 });
        }
    </script>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
    <asp:ScriptManager runat="server" />
    
    <h2 class="pagetitle res32">资源清单</h2>
    <table class="toolbar">
        <tr>
            <td>
                <a href="Add.aspx" class="btn"><span class="icon icon-add"></span>添加资源</a>
            </td>
        </tr>
    </table>
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <p>
                <asp:GridView ID="grid" runat="server" DataKeyNames="ID" 
                    AutoGenerateColumns="false" 
                    CssClass="stylized full" 
                    AllowPaging="true"
                    PageSize="15" 
                    OnRowCommand="grid_RowCommand" 
                    onpageindexchanging="grid_PageIndexChanging" >
                    <EmptyDataTemplate>
                        <uc:EmptyData ID="EmptyData1" runat="server" />
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:BoundField HeaderText="名称" DataField="ID" />
                        <asp:BoundField HeaderText="描述" DataField="Display" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton runat="server" Text="删除" CssClass="linkcmd cmd-del" 
                                    CommandName="_delete" CommandArgument='<%#Eval("ID")%>' 
                                    OnClientClick="return confirm('确定要删除吗?');"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </p>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
